package com.bm.util;
import com.bm.Do.Common.InfoDo;
import com.bm.model.EjyyPropertyCompanyUser;

/**
 * @author hch
 * @version 1.0
 * @description threadLocal工具类
 * @date 2024/1/10 15:29
 */

public class AuthContextUtil {
    //创建threadLocal对象
    private static final ThreadLocal<InfoDo> threadLocal = new ThreadLocal<>();

    /**
     * 存入
     * @param infoDo
     */

    public static void set(InfoDo infoDo) {
        threadLocal.set(infoDo);
    }

    /**
     * 获取
     * @return
     */
    public  static  InfoDo get() {
        return threadLocal.get();
    }

    /**
     * 删除
     */
    public static void remove() {
        threadLocal.remove();
    }

}
